/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2023. All rights reserved.
 */

package model

import "time"

/*
* OrderId 平台订单号
* PlatformType 平台类型,1为云上按需资源订单,2为平台按需资源订单
* ResourceId 按需资源ID,云上资源为云上资源ID，自有资源为平台生成ID
* UserId 平台用户ID
* CloudUserId 云上用户ID
* CreatedId 辅助CreatedTime排序的索引
* CreatedTime 系统订单创建时间
* CouponId 订单使用的优惠券ID
* OrderType 订单类型 -- 1.新购 2.变更
* OrderStatus 订单状态
 */
type OnDemandOrder struct {
	OrderId              string    `orm:"column(order_id);size(64);index"`
	PlatformType         string    `orm:"column(platform_type);size(10)"`
	ResourceId           string    `orm:"column(resource_id);size(64);"`
	CloudResourceName    string    `orm:"column(cloud_resource_name);size(64);"`
	UserId               string    `orm:"column(user_id);size(64);"`
	CloudUserId          string    `orm:"column(cloud_user_id);size(64);"`
	CreatedId            int32     `orm:"column(created_id);auto;index;type(int)"`
	CreatedTime          time.Time `orm:"column(created_time);auto_now_add;size(datetime)"`
	CouponId             string    `orm:"column(coupon_id);size(64);"`
	Currency             string    `orm:"column(currency);size(8)"`
	OrderType            int32     `orm:"column(order_type);type(int)"`
	OrderStatus          int32     `orm:"column(order_status);type(int)"`
	RegionCode           string    `orm:"column(region_code);size(32)"`
	AvailabilityZoneCode string    `orm:"column(availability_zone_code);size(32)"`
	ServiceTypeCode      string    `orm:"column(service_type_code);size(32)"`
	ServiceTypeName      string    `orm:"column(service_type_name);size(32)"`
	ProductSpecDesc      string    `orm:"column(product_spec_desc);size(128)"`
}
